import request from '../utils/httpRequest'
export function getContent(params) {
    return request({
        url: `/index`,
        method: 'get',
        params
    })
}
export function getBanner(params) {
    return request({
        url: `/round-sowing`,
        method: 'get',
        params
    })
}
export function getPartitions(params) {
    return request({
        url: `/partitions`,
        method: 'get',
        params
    })
}
export function getRankings(id) {
    return request({
        url: `/ranking/${id}`,
        method: 'get'
    })
}
// 获取分类排行
export function getRankingRegion(params) {
    return request({
        url: `/ranking/region`,
        method: 'get',
        params
    })
}
// 获取最新分类排行
export function getRankingArchive(params) {
    return request({
        url: `/ranking/archive`,
        method: 'get',
        params
    })
}
// 获取直播首页数据
export function getLiveIndexData() {
    return request({
        url: `/live/data`,
        method: 'get'
    })
}
// 获取直播房间列表数据
export function getLiveListData(params) {
    return request({
        url: `/live/room/list`,
        method: 'get',
        params
    })
}
// 获取直播房间列表数据
export function getAreas(params) {
    return request({
        url: `/live/area`,
        method: 'get',
        params
    })
}
/**
 * 获取热搜词
 */
export function getHotwords() {
    return request({
        url: `/search/hotword`,
        method: 'get'
    })
}
// 获取直播房间列表数据
export function getRoomInfo(params) {
    return request({
        url: `/live/room/info`,
        method: 'get',
        params
    })
}
// 获取直播地址

export function getLiveUrl(params) {
    return request({
        url: `/live/room/play_url`,
        method: 'get',
        params
    })
}
/**
 * 获取up主信息
 */
export function getUserInfo(mId) {
    return request({
        url: `/up/${mId}`,
        method: 'get'
    })
}
// 获取弹幕配置
export function getDanMuConfig(roomId) {
    return request({
        url: `/live/room/danmu_config`,
        method: 'get',
        params: { roomId }
    })
}
export function getSuggests(params) {
    return request({
        url: `/search/suggest`,
        method: 'get',
        params
    })
}
/**
 * 获取搜索结果
 */
export function getSearchResult(data) {
    return request({
        url: `/search`,
        method: 'post',
        data
    })
}
/**
 * 获取排行榜分类
 */
export function getRankingPartitions() {
    return request({
        url: `/ranking/partitions`,
        method: 'get'
    })
}
/**
 * 获取up主投稿视频
 */
export function getUserVideos(params) {
    return request({
        url: `/up/video`,
        method: 'get',
        params
    })
}
export function getVideoInfo(id) {
    return request({
        url: `/av/${id}`,
        method: 'get'
    })
}
/**
 * 获取推荐视频列表
 */
export function getRecommendVides(id) {
    return request({
        url: `/av/recommend/${id}`,
        method: 'get'
    })
}

/**
 * 获取评论列表
 */
export function getComments(params) {
    return request({
        url: `/av/replay`,
        method: 'get',
        params
    })
}
export function getPlayUrl(aId, cId) {
    return request({
        url: `/av/play_url?aId=${aId}&cId=${cId}`,
        method: 'get'
    })
}
/**
 * 获取弹幕
 */
export function getBarrages(id) {
    return request({
        url: `/av/barrage/${id}`,
        method: 'get'
    })
}

// 获取礼物
export function getRoomGifts() {
    return request({
        url: `/live/room/gifts`,
        method: 'get'
    })
}
